package com.group3.merchant.validator.impl;
import java.util.ArrayList;
import java.util.List;

import com.group3.merchant.validator.IValidator;

public class AddMenuValidator implements IValidator {
	private final String NOT_RIGHT_DIGIT = "PRICE MUST BE RIGHT DIGIT";
	@Override
	public List<String> validate(String s) {
		List<String> errMsg=new ArrayList<String>();
		for(int i=0;i<s.length();i++){
			if((!Character.isDigit(s.charAt(i)))&&s.charAt(i)!='.');
			errMsg.add(NOT_RIGHT_DIGIT);
		}
		return errMsg;
	}

}
